package Service;

import Dao.BankDao;
import Pojo.Bank;

import java.sql.SQLException;
import java.util.List;

public class BankService {
    private final BankDao bankDao = new BankDao();

    public List<Bank> getBankMsgAll() throws SQLException {
        return bankDao.getBankMsgAll();
    }

    public int addBankIsAdmin(String bankName) throws SQLException {
        return bankDao.addBankIsAdmin(bankName);
    }

    public int updateBankMsgIsAdminByBankId(String bankName, String bankId) throws SQLException {
        return bankDao.updateBankMsgIsAdminByBankId(bankName, bankId);
    }

    public int deleteBankIsAdminByBankId(String bankId) throws SQLException {
        return bankDao.deleteBankIsAdminByBankId(bankId);
    }
}
